// var WxAutoImage = require('../../js/wxAutoImageCal.js');
// var loading = require('../../template/common.js');
//index.js
//获取应用实例

var app = getApp()
Page({
  data: {
    hiddening:true,
    userInfo: {},
    indicatorDots:true,
    autoplay:true,
    interval:'2000',
    duration:'1000',
    circular:true,
    headImg:"../../image/headline.png",
    goodclassify:["贺卡礼品类","家居生活类","办公文具类"],
    goodclassifyimg:["https://cyjsgitee.gitee.io/wx-miniprograms-pictures/products/jianyun.png",
                      "https://cyjsgitee.gitee.io/wx-miniprograms-pictures/products/jianyun.png",
                      "https://cyjsgitee.gitee.io/wx-miniprograms-pictures/products/jianyun.png"
    ],
    type1:[
      {"name":"礼品盒","pic":"https://cyjsgitee.gitee.io/wx-miniprograms-pictures/products/1类产品1.jpg"},
      {"name":"手提袋","pic":"https://cyjsgitee.gitee.io/wx-miniprograms-pictures/products/1类产品2.jpg"},
      {"name":"明信片，贺卡","pic":"https://cyjsgitee.gitee.io/wx-miniprograms-pictures/products/1类产品3.jpg"}],
    grain:[
      {"name":"果盘","pic":"https://cyjsgitee.gitee.io/wx-miniprograms-pictures/products/2_1.png"},
      {"name":"家具","pic":"https://cyjsgitee.gitee.io/wx-miniprograms-pictures/products/2_2.png"},
      {"name":"桌垫","pic":"https://cyjsgitee.gitee.io/wx-miniprograms-pictures/products/2_3.png"},],
    local:[
        {"name":"笔筒","pic":"https://cyjsgitee.gitee.io/wx-miniprograms-pictures/products/3_1.png"},
        {"name":"书签","pic":"https://cyjsgitee.gitee.io/wx-miniprograms-pictures/products/3_2.png"},
        {"name":"桌面摆件","pic":"https://cyjsgitee.gitee.io/wx-miniprograms-pictures/products/3_3.png"},],
    teawine:[
      {"name":"韩国清河清酒","pic":"../../image/tea-2.jpg","price":"￥82.0"},
      {"name":"特级明前茶","pic":"../../image/tea-3.jpg","price":"￥398.0"},
      {"name":"欢沁桃红葡萄酒","pic":"../../image/tea-4.jpg","price":"￥83.0"},
      {"name":"普洱迷你小沱茶","pic":"../../image/tea-5.jpg","price":"￥82.0"},
      {"name":"忆江南龙井","pic":"../../image/tea-6.jpg","price":"￥82.0"},
      {"name":"欢沁桃红葡萄酒","pic":"../../image/tea-7.jpg","price":"￥82.0"}],
    imported:[
      {"name":"泰国金枕头榴莲","pic":"../../image/imported-1.jpg","price":"￥82.0"},
      {"name":"爱伦蒂全脂纯牛奶","pic":"../../image/imported-2.jpg","price":"￥398.0"},
      {"name":"澳洲混合桉树蜂蜜","pic":"../../image/imported-3.jpg","price":"￥83.0"},
      {"name":"马来西亚白咖啡","pic":"../../image/imported-4.jpg","price":"￥82.0"},
      {"name":"越南白心火龙果 ","pic":"../../image/imported-6.jpg","price":"￥82.0"},
      {"name":"西班牙特级橄榄油","pic":"../../image/imported-39.jpg","price":"￥82.0"}]
  },
  onShareAppMessage:function(){
        return{
          title:"小程序商城",
          desc:"全球最火商城",
          path:"/page/user?id=123"
        }
  },
  cusImageLoad: function(e){
        var that = this;
        that.setData(WxAutoImage.wxAutoImageCal(e));
  },
  tapName: function(event) {
    console.log(event)
  },
  onLoad:function(){
       var that=this;
       this.setData({
           hiddening:false
       })
  },
  onReady:function(){
       var that=this;
       setTimeout(function(){
            that.setData({
              hiddening:true
            })
         console.log('close')                             
        },2000)
  }    
})
